import 'package:wanxiang_app/generated/json/base/json_convert_content.dart';
import 'package:wanxiang_app/bean/config_entity.dart';

ConfigEntity $ConfigEntityFromJson(Map<String, dynamic> json) {
  final ConfigEntity configEntity = ConfigEntity();
  final int? code = jsonConvert.convert<int>(json['code']);
  if (code != null) {
    configEntity.code = code;
  }
  final String? msg = jsonConvert.convert<String>(json['msg']);
  if (msg != null) {
    configEntity.msg = msg;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    configEntity.url = url;
  }
  final String? urlt = jsonConvert.convert<String>(json['urlt']);
  if (urlt != null) {
    configEntity.urlt = urlt;
  }
  final String? data = jsonConvert.convert<String>(json['data']);
  if (data != null) {
    configEntity.data = data;
  }
  final String? fqkf = jsonConvert.convert<String>(json['fqkf']);
  if (fqkf != null) {
    configEntity.fqkf = fqkf;
  }
  final String? fqkfText = jsonConvert.convert<String>(json['fqkfText']);
  if (fqkfText != null) {
    configEntity.fqkfText = fqkfText;
  }
  return configEntity;
}

Map<String, dynamic> $ConfigEntityToJson(ConfigEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['code'] = entity.code;
  data['msg'] = entity.msg;
  data['url'] = entity.url;
  data['urlt'] = entity.urlt;
  data['data'] = entity.data;
  data['fqkf'] = entity.fqkf;
  data['fqkfText'] = entity.fqkfText;
  return data;
}

extension ConfigEntityExtension on ConfigEntity {
  ConfigEntity copyWith({
    int? code,
    String? msg,
    String? url,
    String? urlt,
    String? data,
    String? fqkf,
    String? fqkfText,
  }) {
    return ConfigEntity()
      ..code = code ?? this.code
      ..msg = msg ?? this.msg
      ..url = url ?? this.url
      ..urlt = urlt ?? this.urlt
      ..data = data ?? this.data
      ..fqkf = fqkf ?? this.fqkf
      ..fqkfText = fqkfText ?? this.fqkfText;
  }
}